# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -verify-regalloc -start-before=greedy,0 -stop-after=virtregrewriter,0  -greedy-regclass-priority-trumps-globalness=1 -o - %s | FileCheck %s

# The allocation would previously fail due to poor ordering based on
# register class. The super wide tuples should be allocated first so
# that we don't need to try to evict them later. Currently we cannot
# partially evict interfering register tuples.

---
name:            need_large_tuple_split
alignment:       1
tracksRegLiveness: true
registers:
  - { id: 0, class: sreg_64_xexec, preferred-register: '$vcc' }
  - { id: 1, class: sreg_64, preferred-register: '$vcc' }
  - { id: 2, class: sreg_64_xexec, preferred-register: '$vcc' }
  - { id: 3, class: sreg_64, preferred-register: '$vcc' }
  - { id: 4, class: sreg_64, preferred-register: '$vcc' }
  - { id: 5, class: sreg_64_xexec, preferred-register: '$vcc' }
  - { id: 6, class: sreg_64_xexec, preferred-register: '$vcc' }
  - { id: 7, class: sreg_64_xexec, preferred-register: '$vcc' }
  - { id: 8, class: sreg_64_xexec, preferred-register: '$vcc' }
  - { id: 9, class: sreg_64_xexec, preferred-register: '$vcc' }
  - { id: 10, class: sreg_64_xexec, preferred-register: '$vcc' }
frameInfo:
  maxAlignment:    1
  hasCalls:        true
machineFunctionInfo:
  maxKernArgAlign: 1
  isEntryFunction: true
  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
  stackPtrOffsetReg: '$sgpr32'
  argumentInfo:
    privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
    privateSegmentWaveByteOffset: { reg: '$sgpr17' }
  occupancy:       8
body:             |
  ; CHECK-LABEL: name: need_large_tuple_split
  ; CHECK: bb.0:
  ; CHECK-NEXT:   successors: %bb.1(0x80000000)
  ; CHECK-NEXT:   liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   renamable $sgpr33 = COPY $sgpr14
  ; CHECK-NEXT:   renamable $sgpr34_sgpr35 = COPY $sgpr4_sgpr5
  ; CHECK-NEXT:   renamable $sgpr12_sgpr13 = V_CMP_GT_I32_e64 1, undef %18:vgpr_32, implicit $exec
  ; CHECK-NEXT:   renamable $sgpr18_sgpr19 = V_CMP_EQ_U32_e64 0, undef %18:vgpr_32, implicit $exec
  ; CHECK-NEXT:   renamable $sgpr20_sgpr21 = V_CMP_NE_U32_e64 0, undef %18:vgpr_32, implicit $exec
  ; CHECK-NEXT:   renamable $sgpr22_sgpr23 = V_CMP_GT_I32_e64 0, undef %18:vgpr_32, implicit $exec
  ; CHECK-NEXT:   renamable $sgpr52 = S_MOV_B32 0
  ; CHECK-NEXT:   renamable $sgpr24_sgpr25 = V_CMP_EQ_U32_e64 undef $sgpr4, undef %18:vgpr_32, implicit $exec
  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:vreg_1024_align2 = COPY renamable $sgpr36_sgpr37_sgpr38_sgpr39_sgpr40_sgpr41_sgpr42_sgpr43_sgpr44_sgpr45_sgpr46_sgpr47_sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67, implicit $exec
  ; CHECK-NEXT:   renamable $sgpr100_sgpr101 = V_CMP_NE_U32_e64 1, undef %18:vgpr_32, implicit $exec
  ; CHECK-NEXT:   renamable $sgpr53 = S_MOV_B32 1083786240
  ; CHECK-NEXT:   SI_SPILL_S1024_SAVE renamable $sgpr36_sgpr37_sgpr38_sgpr39_sgpr40_sgpr41_sgpr42_sgpr43_sgpr44_sgpr45_sgpr46_sgpr47_sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67, %stack.1, implicit $exec, implicit $sgpr32 :: (store (s1024) into %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   S_BRANCH %bb.1
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.1:
  ; CHECK-NEXT:   successors: %bb.2(0x40000000), %bb.17(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   $vcc = S_AND_B64 $exec, renamable $sgpr100_sgpr101, implicit-def dead $scc
  ; CHECK-NEXT:   [[COPY1:%[0-9]+]]:vreg_1024_align2 = COPY [[COPY]]
  ; CHECK-NEXT:   S_CBRANCH_VCCNZ %bb.2, implicit $vcc
  ; CHECK-NEXT:   S_BRANCH %bb.17
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.2:
  ; CHECK-NEXT:   successors: %bb.11(0x40000000), %bb.5(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   renamable $sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr52 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr53 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr54 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr55 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr56 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr57 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr58 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr59 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr60 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr61 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr62 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr63 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr64 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr65 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr66 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr67 = COPY killed renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95_sgpr96_sgpr97_sgpr98_sgpr99 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr68 = COPY killed renamable $sgpr84
  ; CHECK-NEXT:   renamable $sgpr36_sgpr37_sgpr38_sgpr39_sgpr40_sgpr41_sgpr42_sgpr43_sgpr44_sgpr45_sgpr46_sgpr47_sgpr48_sgpr49_sgpr50_sgpr51 = COPY killed renamable $sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67
  ; CHECK-NEXT:   renamable $sgpr52 = COPY renamable $sgpr68
  ; CHECK-NEXT:   renamable $sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr53 = COPY killed renamable $sgpr72
  ; CHECK-NEXT:   renamable $sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr54 = COPY killed renamable $sgpr72
  ; CHECK-NEXT:   renamable $sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr55 = COPY killed renamable $sgpr72
  ; CHECK-NEXT:   renamable $sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr56 = COPY killed renamable $sgpr72
  ; CHECK-NEXT:   renamable $sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr57 = COPY killed renamable $sgpr76
  ; CHECK-NEXT:   renamable $sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr58 = COPY killed renamable $sgpr76
  ; CHECK-NEXT:   renamable $sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr59 = COPY killed renamable $sgpr76
  ; CHECK-NEXT:   renamable $sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr60 = COPY killed renamable $sgpr76
  ; CHECK-NEXT:   renamable $sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr61 = COPY killed renamable $sgpr80
  ; CHECK-NEXT:   renamable $sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr62 = COPY killed renamable $sgpr80
  ; CHECK-NEXT:   renamable $sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr63 = COPY killed renamable $sgpr80
  ; CHECK-NEXT:   renamable $sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr64 = COPY killed renamable $sgpr80
  ; CHECK-NEXT:   renamable $sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95_sgpr96_sgpr97_sgpr98_sgpr99 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr65 = COPY killed renamable $sgpr84
  ; CHECK-NEXT:   renamable $sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95_sgpr96_sgpr97_sgpr98_sgpr99 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr66 = COPY killed renamable $sgpr84
  ; CHECK-NEXT:   renamable $sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95_sgpr96_sgpr97_sgpr98_sgpr99 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   renamable $sgpr67 = COPY killed renamable $sgpr84
  ; CHECK-NEXT:   [[COPY2:%[0-9]+]]:vreg_1024_align2 = COPY killed renamable $sgpr36_sgpr37_sgpr38_sgpr39_sgpr40_sgpr41_sgpr42_sgpr43_sgpr44_sgpr45_sgpr46_sgpr47_sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67, implicit $exec
  ; CHECK-NEXT:   S_CBRANCH_EXECZ %bb.11, implicit $exec
  ; CHECK-NEXT:   S_BRANCH %bb.5
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.3:
  ; CHECK-NEXT:   successors: %bb.4(0x80000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   renamable $sgpr60 = COPY killed renamable $sgpr33
  ; CHECK-NEXT:   renamable $sgpr62 = COPY killed renamable $sgpr15
  ; CHECK-NEXT:   SI_SPILL_S32_SAVE killed renamable $sgpr16, %stack.0, implicit $exec, implicit $sgpr32 :: (store (s32) into %stack.0, addrspace 5)
  ; CHECK-NEXT:   ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
  ; CHECK-NEXT:   dead $sgpr30_sgpr31 = SI_CALL undef renamable $sgpr4_sgpr5, 0, CustomRegMask($sgpr60,$sgpr62)
  ; CHECK-NEXT:   ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.4:
  ; CHECK-NEXT:   successors: %bb.17(0x80000000)
  ; CHECK-NEXT:   liveins: $sgpr60, $sgpr62
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
  ; CHECK-NEXT:   $sgpr12 = COPY killed renamable $sgpr60
  ; CHECK-NEXT:   $sgpr13 = COPY killed renamable $sgpr62
  ; CHECK-NEXT:   $sgpr14 = SI_SPILL_S32_RESTORE %stack.0, implicit $exec, implicit $sgpr32 :: (load (s32) from %stack.0, addrspace 5)
  ; CHECK-NEXT:   dead $sgpr30_sgpr31 = SI_CALL undef renamable $sgpr4_sgpr5, 0, csr_amdgpu_noregs, implicit $sgpr12, implicit $sgpr13, implicit $sgpr14
  ; CHECK-NEXT:   ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
  ; CHECK-NEXT:   S_BRANCH %bb.17
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.5:
  ; CHECK-NEXT:   successors: %bb.12(0x40000000), %bb.6(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   renamable $sgpr4_sgpr5 = S_AND_B64 renamable $sgpr20_sgpr21, undef renamable $sgpr88_sgpr89, implicit-def dead $scc
  ; CHECK-NEXT:   renamable $sgpr88_sgpr89 = V_CMP_GT_I32_e64 0, undef %18:vgpr_32, implicit $exec
  ; CHECK-NEXT:   $exec = S_MOV_B64_term killed renamable $sgpr4_sgpr5
  ; CHECK-NEXT:   S_CBRANCH_EXECZ %bb.12, implicit $exec
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.6:
  ; CHECK-NEXT:   successors: %bb.7(0x80000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr88_sgpr89, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   dead %27:vgpr_32 = V_CNDMASK_B32_e64 0, 0, 0, 1, $sgpr22_sgpr23, implicit $exec
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.7:
  ; CHECK-NEXT:   successors: %bb.8(0x80000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr88_sgpr89, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   renamable $sgpr90_sgpr91 = nofpexcept V_CMP_NLT_F64_e64 0, undef $sgpr4_sgpr5, 0, undef %29:vreg_64_align2, 0, implicit $mode, implicit $exec
  ; CHECK-NEXT:   renamable $sgpr92_sgpr93 = nofpexcept V_CMP_NLT_F64_e64 0, 4607182418800017408, 0, undef %29:vreg_64_align2, 0, implicit $mode, implicit $exec
  ; CHECK-NEXT:   dead %30:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V32 [[COPY1]], undef $sgpr33, 11, implicit-def $m0, implicit $m0, implicit $exec
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.8:
  ; CHECK-NEXT:   successors: %bb.10(0x40000000), %bb.9(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr88_sgpr89, $sgpr90_sgpr91, $sgpr92_sgpr93, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   $vcc = S_AND_B64 $exec, renamable $sgpr90_sgpr91, implicit-def dead $scc
  ; CHECK-NEXT:   S_CBRANCH_VCCNZ %bb.10, implicit $vcc
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.9:
  ; CHECK-NEXT:   successors: %bb.10(0x40000000), %bb.17(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr88_sgpr89, $sgpr90_sgpr91, $sgpr92_sgpr93, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   renamable $sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
  ; CHECK-NEXT:   [[COPY2:%[0-9]+]]:vreg_64_align2 = COPY killed renamable $sgpr68_sgpr69, implicit $exec
  ; CHECK-NEXT:   GLOBAL_STORE_DWORDX2_SADDR undef %18:vgpr_32, [[COPY2]], undef renamable $sgpr4_sgpr5, 0, 0, implicit $exec :: (store (s64), addrspace 1)
  ; CHECK-NEXT:   [[V_CNDMASK_B32_e64_:%[0-9]+]]:vgpr_32 = V_CNDMASK_B32_e64 0, 0, 0, 1, $sgpr12_sgpr13, implicit $exec
  ; CHECK-NEXT:   dead renamable $sgpr4_sgpr5 = V_CMP_NE_U32_e64 1, [[V_CNDMASK_B32_e64_]], implicit $exec
  ; CHECK-NEXT:   renamable $sgpr64 = S_ADD_U32 renamable $sgpr8, 32, implicit-def dead $scc
  ; CHECK-NEXT:   ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
  ; CHECK-NEXT:   $sgpr4_sgpr5 = COPY renamable $sgpr34_sgpr35
  ; CHECK-NEXT:   renamable $sgpr52_sgpr53 = COPY killed renamable $sgpr6_sgpr7
  ; CHECK-NEXT:   $sgpr6_sgpr7 = COPY renamable $sgpr52_sgpr53
  ; CHECK-NEXT:   renamable $sgpr38_sgpr39 = COPY killed renamable $sgpr10_sgpr11
  ; CHECK-NEXT:   $sgpr10_sgpr11 = COPY renamable $sgpr38_sgpr39
  ; CHECK-NEXT:   renamable $sgpr42_sgpr43 = COPY killed renamable $sgpr12_sgpr13
  ; CHECK-NEXT:   $sgpr12 = COPY renamable $sgpr33
  ; CHECK-NEXT:   $sgpr13 = COPY renamable $sgpr15
  ; CHECK-NEXT:   renamable $sgpr36 = COPY killed renamable $sgpr16
  ; CHECK-NEXT:   renamable $sgpr37 = COPY killed renamable $sgpr15
  ; CHECK-NEXT:   renamable $sgpr40 = COPY killed renamable $sgpr8
  ; CHECK-NEXT:   renamable $sgpr44_sgpr45 = COPY killed renamable $sgpr18_sgpr19
  ; CHECK-NEXT:   renamable $sgpr46_sgpr47 = COPY killed renamable $sgpr20_sgpr21
  ; CHECK-NEXT:   renamable $sgpr48_sgpr49 = COPY killed renamable $sgpr22_sgpr23
  ; CHECK-NEXT:   renamable $sgpr50_sgpr51 = COPY killed renamable $sgpr24_sgpr25
  ; CHECK-NEXT:   dead $sgpr30_sgpr31 = SI_CALL undef renamable $sgpr4_sgpr5, 0, csr_amdgpu_gfx90ainsts, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr10_sgpr11, implicit $sgpr12, implicit $sgpr13
  ; CHECK-NEXT:   ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
  ; CHECK-NEXT:   ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
  ; CHECK-NEXT:   $sgpr8_sgpr9 = COPY renamable $sgpr64_sgpr65
  ; CHECK-NEXT:   dead $sgpr30_sgpr31 = SI_CALL undef renamable $sgpr4_sgpr5, 0, csr_amdgpu_gfx90ainsts, implicit $sgpr8_sgpr9
  ; CHECK-NEXT:   renamable $sgpr24_sgpr25 = COPY killed renamable $sgpr50_sgpr51
  ; CHECK-NEXT:   renamable $sgpr22_sgpr23 = COPY killed renamable $sgpr48_sgpr49
  ; CHECK-NEXT:   renamable $sgpr20_sgpr21 = COPY killed renamable $sgpr46_sgpr47
  ; CHECK-NEXT:   renamable $sgpr18_sgpr19 = COPY killed renamable $sgpr44_sgpr45
  ; CHECK-NEXT:   renamable $sgpr12_sgpr13 = COPY killed renamable $sgpr42_sgpr43
  ; CHECK-NEXT:   renamable $sgpr8 = COPY killed renamable $sgpr40
  ; CHECK-NEXT:   renamable $sgpr10_sgpr11 = COPY killed renamable $sgpr38_sgpr39
  ; CHECK-NEXT:   renamable $sgpr15 = COPY killed renamable $sgpr37
  ; CHECK-NEXT:   renamable $sgpr16 = COPY killed renamable $sgpr36
  ; CHECK-NEXT:   renamable $sgpr6_sgpr7 = COPY killed renamable $sgpr52_sgpr53
  ; CHECK-NEXT:   ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
  ; CHECK-NEXT:   $exec = S_MOV_B64_term renamable $sgpr92_sgpr93
  ; CHECK-NEXT:   S_CBRANCH_EXECZ %bb.10, implicit $exec
  ; CHECK-NEXT:   S_BRANCH %bb.17
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.10:
  ; CHECK-NEXT:   successors: %bb.8(0x40000000), %bb.12(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr88_sgpr89, $sgpr90_sgpr91, $sgpr92_sgpr93, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   S_CBRANCH_EXECZ %bb.8, implicit $exec
  ; CHECK-NEXT:   S_BRANCH %bb.12
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.11:
  ; CHECK-NEXT:   successors: %bb.1(0x40000000), %bb.17(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   S_CBRANCH_EXECZ %bb.1, implicit $exec
  ; CHECK-NEXT:   S_BRANCH %bb.17
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.12:
  ; CHECK-NEXT:   successors: %bb.11(0x40000000), %bb.13(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr88_sgpr89, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   $exec = S_MOV_B64_term killed renamable $sgpr88_sgpr89
  ; CHECK-NEXT:   S_CBRANCH_EXECZ %bb.11, implicit $exec
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.13:
  ; CHECK-NEXT:   successors: %bb.15(0x40000000), %bb.14(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   $vcc = S_AND_B64 $exec, renamable $sgpr24_sgpr25, implicit-def dead $scc
  ; CHECK-NEXT:   S_CBRANCH_VCCNZ %bb.15, implicit $vcc
  ; CHECK-NEXT:   S_BRANCH %bb.14
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.14:
  ; CHECK-NEXT:   successors: %bb.15(0x80000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.15:
  ; CHECK-NEXT:   successors: %bb.11(0x40000000), %bb.16(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33, $sgpr6_sgpr7, $sgpr8_sgpr9:0x0000000000000003, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr18_sgpr19, $sgpr20_sgpr21, $sgpr22_sgpr23, $sgpr24_sgpr25, $sgpr34_sgpr35, $sgpr100_sgpr101
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   $vcc = S_AND_B64 $exec, renamable $sgpr18_sgpr19, implicit-def dead $scc
  ; CHECK-NEXT:   S_CBRANCH_VCCNZ %bb.11, implicit $vcc
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.16:
  ; CHECK-NEXT:   successors: %bb.3(0x40000000), %bb.17(0x40000000)
  ; CHECK-NEXT:   liveins: $sgpr15, $sgpr16, $sgpr33
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   S_CBRANCH_EXECZ %bb.3, implicit $exec
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.17:
  bb.0:
    liveins: $vgpr0, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11, $sgpr14, $sgpr15, $sgpr16

    %11:sgpr_32 = COPY $sgpr16
    %12:sgpr_32 = COPY $sgpr15
    %13:sgpr_32 = COPY $sgpr14
    %14:sgpr_64 = COPY $sgpr10_sgpr11
    %15:sgpr_64 = COPY $sgpr8_sgpr9
    %16:sgpr_64 = COPY $sgpr6_sgpr7
    %17:sgpr_64 = COPY $sgpr4_sgpr5
    %5:sreg_64_xexec = V_CMP_GT_I32_e64 1, undef %18:vgpr_32, implicit $exec
    %6:sreg_64_xexec = V_CMP_EQ_U32_e64 0, undef %18:vgpr_32, implicit $exec
    %7:sreg_64_xexec = V_CMP_NE_U32_e64 0, undef %18:vgpr_32, implicit $exec
    %8:sreg_64_xexec = V_CMP_GT_I32_e64 0, undef %18:vgpr_32, implicit $exec
    undef %19.sub16:sgpr_1024 = S_MOV_B32 0
    %9:sreg_64_xexec = V_CMP_EQ_U32_e64 undef %20:sreg_32_xm0_xexec, undef %18:vgpr_32, implicit $exec
    %21:vreg_1024_align2 = COPY %19, implicit $exec
    %10:sreg_64_xexec = V_CMP_NE_U32_e64 1, undef %18:vgpr_32, implicit $exec
    %19.sub17:sgpr_1024 = S_MOV_B32 1083786240
    S_BRANCH %bb.1

  bb.1:
    $vcc = S_AND_B64 $exec, %10, implicit-def dead $scc
    %22:vreg_1024_align2 = COPY %21
    S_CBRANCH_VCCNZ %bb.2, implicit $vcc
    S_BRANCH %bb.17

  bb.2:
    undef %23.sub0:sgpr_1024 = COPY %19.sub16
    %23.sub1:sgpr_1024 = COPY %19.sub16
    %23.sub2:sgpr_1024 = COPY %19.sub16
    %23.sub3:sgpr_1024 = COPY %19.sub16
    %23.sub4:sgpr_1024 = COPY %19.sub16
    %23.sub5:sgpr_1024 = COPY %19.sub16
    %23.sub6:sgpr_1024 = COPY %19.sub16
    %23.sub7:sgpr_1024 = COPY %19.sub16
    %23.sub8:sgpr_1024 = COPY %19.sub16
    %23.sub9:sgpr_1024 = COPY %19.sub16
    %23.sub10:sgpr_1024 = COPY %19.sub16
    %23.sub11:sgpr_1024 = COPY %19.sub16
    %23.sub12:sgpr_1024 = COPY %19.sub16
    %23.sub13:sgpr_1024 = COPY %19.sub16
    %23.sub14:sgpr_1024 = COPY %19.sub16
    %23.sub15:sgpr_1024 = COPY %19.sub16
    %23.sub16:sgpr_1024 = COPY %19.sub16
    %23.sub17:sgpr_1024 = COPY %19.sub16
    %23.sub18:sgpr_1024 = COPY %19.sub16
    %23.sub19:sgpr_1024 = COPY %19.sub16
    %23.sub20:sgpr_1024 = COPY %19.sub16
    %23.sub21:sgpr_1024 = COPY %19.sub16
    %23.sub22:sgpr_1024 = COPY %19.sub16
    %23.sub23:sgpr_1024 = COPY %19.sub16
    %23.sub24:sgpr_1024 = COPY %19.sub16
    %23.sub25:sgpr_1024 = COPY %19.sub16
    %23.sub26:sgpr_1024 = COPY %19.sub16
    %23.sub27:sgpr_1024 = COPY %19.sub16
    %23.sub28:sgpr_1024 = COPY %19.sub16
    %23.sub29:sgpr_1024 = COPY %19.sub16
    %23.sub30:sgpr_1024 = COPY %19.sub16
    %23.sub31:sgpr_1024 = COPY %19.sub16
    %21:vreg_1024_align2 = COPY %23, implicit $exec
    S_CBRANCH_EXECZ %bb.11, implicit $exec
    S_BRANCH %bb.5

  bb.3:
    ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
    dead $sgpr30_sgpr31 = SI_CALL undef %24:sreg_64_xexec, 0, CustomRegMask($sgpr60,$sgpr62)
    ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32

  bb.4:
    ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
    $sgpr12 = COPY %13
    $sgpr13 = COPY %12
    $sgpr14 = COPY %11
    dead $sgpr30_sgpr31 = SI_CALL undef %25:sreg_64, 0, csr_amdgpu_noregs, implicit killed $sgpr12, implicit killed $sgpr13, implicit $sgpr14
    ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
    S_BRANCH %bb.17

  bb.5:
    %26:sreg_64 = S_AND_B64 %7, undef %3, implicit-def dead $scc
    %3:sreg_64 = V_CMP_GT_I32_e64 0, undef %18:vgpr_32, implicit $exec
    $exec = S_MOV_B64_term %26
    S_CBRANCH_EXECZ %bb.12, implicit $exec

  bb.6:
    dead %27:vgpr_32 = V_CNDMASK_B32_e64 0, 0, 0, 1, %8, implicit $exec

  bb.7:
    %0:sreg_64_xexec = nofpexcept V_CMP_NLT_F64_e64 0, undef %28:sreg_64, 0, undef %29:vreg_64_align2, 0, implicit $mode, implicit $exec
    %1:sreg_64 = nofpexcept V_CMP_NLT_F64_e64 0, 4607182418800017408, 0, undef %29:vreg_64_align2, 0, implicit $mode, implicit $exec
    dead %30:vgpr_32 = V_INDIRECT_REG_READ_GPR_IDX_B32_V32 %22, undef %13, 11, implicit-def $m0, implicit $m0, implicit $exec

  bb.8:
    $vcc = S_AND_B64 $exec, %0, implicit-def dead $scc
    S_CBRANCH_VCCNZ %bb.10, implicit $vcc

  bb.9:
    %31:vreg_64_align2 = COPY %19.sub16_sub17, implicit $exec
    GLOBAL_STORE_DWORDX2_SADDR undef %18:vgpr_32, %31, undef %24:sreg_64_xexec, 0, 0, implicit $exec :: (store (s64), addrspace 1)
    %32:vgpr_32 = V_CNDMASK_B32_e64 0, 0, 0, 1, %5, implicit $exec
    dead %33:sreg_64_xexec = V_CMP_NE_U32_e64 1, %32, implicit $exec
    undef %34.sub0:sreg_64 = S_ADD_U32 %15.sub0, 32, implicit-def dead $scc
    ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
    $sgpr4_sgpr5 = COPY %17
    $sgpr6_sgpr7 = COPY %16
    $sgpr10_sgpr11 = COPY %14
    $sgpr12 = COPY %13
    $sgpr13 = COPY %12
    dead $sgpr30_sgpr31 = SI_CALL undef %33, 0, csr_amdgpu_gfx90ainsts, implicit $sgpr4_sgpr5, implicit $sgpr6_sgpr7, implicit $sgpr10_sgpr11, implicit killed $sgpr12, implicit killed $sgpr13
    ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
    ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
    $sgpr8_sgpr9 = COPY %34
    dead $sgpr30_sgpr31 = SI_CALL undef %33, 0, csr_amdgpu_gfx90ainsts, implicit $sgpr8_sgpr9
    ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32
    $exec = S_MOV_B64_term %1
    S_CBRANCH_EXECZ %bb.10, implicit $exec
    S_BRANCH %bb.17

  bb.10:
    S_CBRANCH_EXECZ %bb.8, implicit $exec
    S_BRANCH %bb.12

  bb.11:
    S_CBRANCH_EXECZ %bb.1, implicit $exec
    S_BRANCH %bb.17

  bb.12:
    $exec = S_MOV_B64_term %3
    S_CBRANCH_EXECZ %bb.11, implicit $exec

  bb.13:
    $vcc = S_AND_B64 $exec, %9, implicit-def dead $scc
    S_CBRANCH_VCCNZ %bb.15, implicit $vcc
    S_BRANCH %bb.14

  bb.14:

  bb.15:
    $vcc = S_AND_B64 $exec, %6, implicit-def dead $scc
    S_CBRANCH_VCCNZ %bb.11, implicit $vcc

  bb.16:
    S_CBRANCH_EXECZ %bb.3, implicit $exec

  bb.17:

...
